package com.hnatourism.hbe.channel.dao.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.hnatourism.hbe.channel.dao.IChannelDao;
import com.hnatourism.hbe.channel.domain.Channel;

public class ChannelDaoImpl extends SqlMapClientDaoSupport implements IChannelDao {
 
	/**
	 * 新增渠道
	 * @param domain
	 * @return
	 * @throws BusinessException
	 */
	public Channel saveChannel(Channel channel) {
		return null;
	}
	 
	/**
	 * 根据ChannelCode查询渠道
	 * @param Channel
	 * @return
	 * @throws BusinessException
	 */
	public Channel queryChannelByCode(Channel channel) {
		try {
			channel = (Channel)this.getSqlMapClient().queryForObject("findChannelByCode", channel.getChannelCode());
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return channel;
	}
	 
	/**
	 * 根据条件查询渠道
	 * @param Channel
	 * @return
	 * @throws BusinessException
	 */
	public List<Channel> queryChannels(Channel channel) {
		return null;
	}
	 
	/**
	 *  修改渠道
	 * @param Channel
	 * @throws BusinessException
	 */
	public void updateChannel(Channel channel) {
	}
	 
	/**
	 * 删除渠道
	 * @param Channel
	 * @throws BusinessException
	 */
	public void deleteChannel(Channel channel) {
	}
	 
	/**
	 *  修改渠道状态
	 * @param Channel
	 * @throws BusinessException
	 */
	public void updateChannelStatus(Channel channel) {
	}
}
 
